package com.kakavr.auth.util;

import java.text.DecimalFormat;
import java.util.UUID;

import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.math.NumberUtils;

/**
 * 加密算法
 * @author gang.yang
 *
 */
public class EncryptionUtils {
	
	private static final String SALT="kaka_vr_USER_pass";
	/**
	 * 默认密码
	 */
	public static final String DEFAULT_PASS = "904efcf169d62e68c169ed6fc9dbc338";
	
	public static String md5(String pass){
		return DigestUtils.md5Hex(SALT+pass);
	}
	
	public static String getUUIDCip(){
		return DigestUtils.md5Hex(UUID.randomUUID().toString());
	}
	
	public static void main(String[] args) {
		System.out.println(new DecimalFormat("#.00").format(NumberUtils.toDouble("111555555")));
	}

}
